﻿using System;
using System.Collections.Generic;
using System.Text;

namespace DotNetX
{
    /// <summary>
    /// This is a collection of StringTokenizationParameter objects
    /// </summary>
    /// <remarks>
    /// RH - TODO: Make this collection not use a dictionary if possible because StringTokenizationParameter.GetSampleParametersWithModifierNames has to return
    /// a List<StringTokenizationParameter> which is a bit out of sync with the rest of the tokenization system
    /// </remarks>
    public class StringTokenizationParameterCollection : Dictionary<string, StringTokenizationParameter>
    {
        /// <summary>
        /// This adds a parameter to this collection
        /// </summary>
        /// <param name="parameter">The parameter to add</param>
        public void Add(StringTokenizationParameter parameter)
        {
            if (parameter == null)
                throw new ArgumentNullException("'parameter' is null.");

            // add this parameter
            this.Add(parameter.Key, parameter);
        }
    }
}
